<%@ page contentType="text/html; charset=utf-8" %>
<%@ page import="cn.lily.inst.web.frames.FrameConfig" %>
<%@ page import="cn.lily.inst.web.security.SystemManager" %>
<%@ page import="cn.lily.web.util.context.WebContext" %>
<%@ page import="cn.lily.esb.context.AuthEntity" %>
<%@ page import="cn.lily.com.lang.BusinessDate" %>
<%@ include file="/global.jsp"%> 
<%
 	String hintStr    = "";
 	String topMenuStr = "";
 	String skinName = "";
 	String operid   = "";
 	String welcomepage = "" ;
 	
 	String exitUrl  = "";
 	FrameConfig.setContextPath(contextPath);
 	AuthEntity authEntity = (AuthEntity) session.getAttribute(WebContext.LOG_AUTH_CONTEXT);
 	if (authEntity != null)
 	{
 		SystemManager om = new SystemManager();
 	   	topMenuStr    = om.getTopMenuStr(authEntity);
 	   	hintStr       = authEntity.getOperatorName();
 		skinName      = authEntity.getSkinName();
 	    operid        = authEntity.getOperatorId();
 	    welcomepage = authEntity.getWelcomePage() ;
 	    exitUrl  = authEntity.getExitUrl();
 	}
 %>
<html >
<head>
	<title><%=FrameConfig.getAppName()%></title>
	<link href="<%=FrameConfig.getCSSPath("/menu/menu.css")%>" type="text/css" rel="stylesheet">	
	<style type="text/css">
		body {margin: 0px;}
		.STYLE1 {font-size: 12px;color: #FFFFFF;}
		.STYLE2 {font-size: 9px;}
		.STYLE3 {color: #033d61;font-size: 12px;}
		.top_point_link{text-decoration: none;border: none;}
		.top_point_link img{border: none;}

		a{
			display:block;
			font-size:15px;
			line-height:18px;
			text-decoration:none;
			color:#ff0000;
			font-family:Arial;
			font-size:12px;
		}
		.shell{
			width:200px;
			padding:3px 2px 2px 20px;
			text-align: left;
		}
		.core{
			height:18px;
			overflow:hidden;
		}

	</style>
</head>

<body onload="top_onload()">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="70" background="<%=FrameConfig.getFramePath("main_05.gif")%>"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="24"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="270" height="24" background="<%=FrameConfig.getFramePath("main_03.gif")%>">&nbsp;</td>
            <td width="505" background="<%=FrameConfig.getFramePath("main_04.gif")%>">&nbsp;</td>
            <td>&nbsp;</td>
            <td width="21"><img src="<%=FrameConfig.getFramePath("main_07.gif")%>" width="21" height="24"></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="48"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
          	<td width="30" height="48" background="<%=FrameConfig.getFramePath("main_63.gif")%>"></td>
            <td width="240" height="48" background="<%=FrameConfig.getSignPath()%>"></td>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
              	<td width="180" valign="bottom"  nowrap="nowrap"><div align="right"><span class="STYLE1"><span class="STYLE2">■</span> 今天：<%=BusinessDate.getToday() %>&nbsp;<%=BusinessDate.getWeekDay() %></span></div></td>
                <td width="77%" height="25" valign="bottom" align="right" ><table width="280" align="right" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                      <td width="69" height="19"></td>
                    
                      <td width="26"><div align="center"><img src="<%=FrameConfig.getFramePath("main_21.gif")%>" width="26" height="19"></div></td>
                     <td width="50" height="19"><div align="center"><a class="top_point_link" href="javaScript:gohome()" ><img src="<%=FrameConfig.getFramePath("main_12.gif")%>" width="49" height="19"></a></div></td>
                     <td width="50"><div align="center"><a href="javascript:refresh_work()" class="top_point_link" ><img src="<%=FrameConfig.getFramePath("main_18.gif")%>" width="48" height="19"></a></div></td>
                   
                     
                    <td width="100"><div align="center"><a href="javascript:changeinfo()" class="top_point_link" ><img src="<%=FrameConfig.getFramePath("main_22.gif")%>" width="98" height="19"></a></div></td>
                    <!-- 
                    <td width="45" align="center"><a href="<%=contextPath%>/pages/frame/changestyle.jsp?styleName=skin_blue&operid=<%=operid %>" target="_top"><img src="<%=contextPath%>blue.gif" style="border:1px solid #eeeeee;"/ title="切换到蓝色皮肤"></a></td>
                    <td width="45" align="center"><a href="<%=contextPath%>/pages/frame/changestyle.jsp?styleName=skin_organge&operid=<%=operid %>" target="_top"><img src="<%=contextPath%>organge.gif" style="border:1px solid #eeeeee;"/ title="切换到红色皮肤"></a></td>
                  -->
                     <td width="26"><div align="center"><img src="<%=FrameConfig.getFramePath("main_21.gif")%>" width="26" height="19"></div></td>
                   
                     <td width="50"><div align="center"><a href="javascript:exit()" class="top_point_link" ><img src="<%=FrameConfig.getFramePath("main_20.gif")%>" width="48" height="19"></a></div></td>
              
                  </tr>
                </table></td>
              </tr>
            </table></td>
            <td width="21"><img src="<%=FrameConfig.getFramePath("main_11.gif")%>" width="21" height="48"></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="8" style=" line-height:8px;"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="270" background="<%=FrameConfig.getFramePath("main_29.gif")%>" style=" line-height:8px;">&nbsp;</td>
            <td width="505" background="<%=FrameConfig.getFramePath("main_30.gif")%>" style=" line-height:8px;">&nbsp;</td>
            <td style="line-height:8px;">&nbsp;</td>
            <td width="21" style=" line-height:8px;"><img src="<%=FrameConfig.getFramePath("main_31.gif")%>" width="21" height="8"></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="28" background="<%=FrameConfig.getFramePath("main_36.gif")%>"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="177" height="28" background="<%=FrameConfig.getFramePath("main_32.gif")%>">
	        <table width="100%" border="0" cellspacing="0" cellpadding="0">
	          <tr>
	            <td width="20%"  height="22">&nbsp;</td>
	            <td width="59%" valign="bottom"><div align="center" class="STYLE1"><%=hintStr %> 您好</div></td>
	            <td width="21%">&nbsp;</td>
	          </tr>
	        </table>
        </td>
      
        <td  >
        	<%=topMenuStr %>
        </td>
        <td align="right">
      		<div class="shell">
		  		<div id="div1" class="core">
			    	&nbsp;
		  		</div> 
			</div>
        </td>
        <td width="21" valign="top"><img src="<%=FrameConfig.getFramePath("main_37.gif")%>" ></td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>
<script type="text/javascript"><!--
			
		function gohome(){
			var v_welcomepage = "<%=welcomepage%>" ;
			parent.window.mainFrame.middleFrame.document.getElementById("img1").src = "<%=FrameConfig.getFramePath("main_55_1.gif")%>";
			parent.window.mainFrame.middleFrame.document.getElementById("frmTitle").style.display = "none" ; 
			if(v_welcomepage!=""){
				parent.window.mainFrame.middleFrame.workFrame.location.replace(contextPath + "<%=welcomepage%>");
			}else{
				//alert('未配置首页显示！请联系系统管理员进行配置');
			}
		}
		function syncpage(){
			parent.window.mainFrame.middleFrame.document.getElementById("img1").src = "<%=contextPath%><%=FrameConfig.getImgPath()%><%=skinName%>/main_55_1.gif";
			parent.window.mainFrame.middleFrame.document.getElementById("frmTitle").style.display = "none"
			parent.window.mainFrame.middleFrame.workFrame.location.replace(contextPath + "/UI/ecuac/manager/synchronous/SyncList.jsp");
		}
		function refresh_work(){
			parent.window.mainFrame.middleFrame.workFrame.location.reload();
		}
		function exit(){
			parent.window.location.replace("<%=exitUrl%>");
		}
		function changeinfo()
		{
			 var dialogArg = "dialogwidth:350px; Dialogheight:200px;center:yes;help:no;resizable:no;scroll:no;status:no";
		 		var arg = new Object();
		 		arg.top =  window.top;
				var  dd    = window.showModalDialog(contextPath +"/UI/portal/system/user/changeinfo.jsp",arg, dialogArg);
		}
		function top_onload()
		{
			/*if (document.all("topmenu"))
			{
				if (document.all("topmenu").children.length>0)
					topmenu_item_click(document.all("topmenu").children[0].children[0])
								
			}*/
			
		}
		/*		
		function myGod(id,w,n){
			var box=document.getElementById(id),can=true,w=w||1500,fq=fq||10,n=n==-1?-1:1;
			box.innerHTML+=box.innerHTML;
			box.onmouseover=function(){can=false};
			box.onmouseout=function(){can=true};
			var max=parseInt(box.scrollHeight/2);
			new function(){
				var stop=box.scrollTop%18==0&&!can;
				if(!stop){
					var set=n>0?[max,0]:[0,max];
					box.scrollTop==set[0]?box.scrollTop=set[1]:box.scrollTop+=n;
				};
				setTimeout(arguments.callee,box.scrollTop%18?fq:w);
			}
		}
		*/
		function removeItem(boxId,itemId){
			var box=document.getElementById(boxId);			
			for ( var i = 0; i < 2; i++) {
				var item=document.getElementById(itemId);
				box.removeChild(item);
			}
		}
		//myGod('div1',2000);

	--></script>
